const Base = require("../base.js");
/**
 * 通过经纬 获取省份城市
 * location=29.56899625,106.55843416
 */
module.exports = class extends Base {
    async indexAction() {
        const location = this.get("location")
        const {result} =await this.dxGet("https://api.map.baidu.com/reverse_geocoding/v3/", {
            ak: 'Vv4btjr4PQrpGIYG4XO6j7TnDCWgoOyO',
            output: "json",
            coordtype: "wgs84ll",
            location
        })
        this.success(result.addressComponent);
    }
};
